import request from '@/utils/request'

// 头部分类导航
export const accountLogin = (data) => {
  return request({
    method: 'POST',
    url: '/login',
    data
  })
}

/**
 * 短信登录
 * @param {String} mobile - 手机号
 * @param {String} code - 验证码
 * @returns Promise
 */
 export const mobileLogin = (data) => {
    return request({
        method: 'POST',
        url: '/login/code',
        data
      })
  }
  
  /**
   * 获取短信登录验证码
   * @param {String} mobile - 手机号
   * @returns Promise
   */
  export const getCode= (mobile) => {
    return request({
        method: 'GET',
        url: `/login/code?mobile=${mobile}`,
      })
  }